<template>
	<view class="page">
		<!-- 累计专注 -->
		<CumulativeDuration :list='CumulativeModule'></CumulativeDuration>
		<!-- 当日专注 -->
		<CurrentDuration :list='CurrentModule' class='mt20'></CurrentDuration>
		<!-- 饼图分析 -->
		<pieChart class='mt20' :list='PieModule'></pieChart>

		<!-- 文字分析 -->
		<!-- 柱状图分析 -->
	</view>
</template>

<script>
	import pieChart from './PieChart.vue'
	import CumulativeDuration from './CumulativeDuration.vue'
	import CurrentDuration from './CurrentDuration.vue'
	export default {
		props: {
			list: {
				type: [Object, Array],
				default: function() {
					return {}
				}
			}
		},
		name: "",
		data() {
			return {
				PieModule: "", // 饼图模块
				CurrentModule: "", //当日模块
				CumulativeModule: "" // 累计模块

			}
		},
		components: {
			pieChart,
			CumulativeDuration,
			CurrentDuration
		},
		watch: {
			list: {
				handler(newQuestion, oldQuestion) {
					this.PieModule = newQuestion.pieData
					this.CurrentModule = newQuestion.Current
					this.CumulativeModule = newQuestion.Cumulative
				},
				immediate: true
			}
		},
	}
</script>

<style scoped lang="less">
</style>
